Click Here!
home account info subscribe login search My ITKnowledge FAQ/help site map contact us


 
Brief Full
 Advanced
      Search
 Search Tips
To access the contents, click the chapter and section titles.

Oracle Performance Tuning and Optimization
(Publisher: Macmillan Computer Publishing)
Author(s): Edward Whalen
ISBN: 067230886x
Publication Date: 04/01/96

Bookmark It

Search this book:
 
Previous Table of Contents Next


At instance startup, a number of Parallel Cache Management (PCM) locks are created. PCM locks are used to lock data blocks being accessed within each instance to guarantee that multiple instances do not alter the same data. These PCM locks may cover hundreds, thousands, or even millions of data blocks, depending on your configuration.

Locks can be acquired in one of two modes:


Mode Description

Exclusive Lock mode When a lock is acquired in Exclusive mode, the instance is allowed to update the blocks covered by the lock. If those blocks are already in use, the DLM requests the other instance to release the lock.
Read Lock mode When a lock is acquired in Read mode, the instance is assured that during the time the lock is active, the data will not change. It is possible for multiple instances to have read locks on the same data blocks.

PCM locks can be used to lock data blocks for reading or for updating. If a PCM lock is used as a read lock, other instances can acquire read locks on the same data blocks. Only when updating a block must an exclusive lock be acquired.


TIP:  Because PCM locks are used to lock data to guarantee data consistency between nodes, you can eliminate the need for PCM locks by taking advantage of read-only tablespaces. Because read-only tablespaces cannot be updated, Oracle does not have to allocate PCM locks for those tables.

When an instance wants to update a data block, it must acquire an exclusive lock on that block. If another instance has a lock that includes that block, the instance holding the lock must write the data out to the shared disk before the lock can be released, a process known as pinging.

Because PCM locks are allocated to data files, you have some flexibility over the configuration of the locks. A PCM lock can lock one or more data blocks, depending on the number of PCM locks allocated to the data file and the size of the data file. Because there is an inherent overhead associated with PCM locks, it is not beneficial to overconfigure the locks.

Because a PCM lock covers more than one block, you may unnecessarily be pinging if you want a block that is not being used by the other instance. This is why, with very active tables, you may want to add more locks; with less-active tables, you can reduce the number of locks.

The Parallel Server option can be quite effective if your application is partitionable. If all the users in your system must access the same data, however, the Parallel Server option may not be for you. But if you can partition your workload into divisions based on table access or if you need a fault-tolerant configuration, consider the Parallel Server option.

If you use the Parallel Server option, take special care to properly configure the system. By designing the system properly, you can take maximum advantage of the parallel server features.

Design Considerations

The primary way to optimize performance with a parallel server cluster is to properly configure the system. By properly configuring the system to avoid contention, you can see very good performance by adding nodes. With the Parallel Server option more than any other Oracle feature, it is important to properly design the system for performance.

In a poorly designed parallel server cluster, you may see no performance improvement by adding nodes; you may even see a degradation in performance. By understanding the basic principles of the Oracle parallel server and setting good design goals, you can achieve amazing performance from the cluster.

Design Goals

The goals in designing a parallel server system are fairly straightforward. Your primary goals are to reduce contention between servers and to reduce the number of PCM locks that must be obtained and released. By reducing contention on specific data areas, you can minimize the use of locks and therefore increase performance.

Assuming that the I/O subsystem can handle the required shared throughput, the only thing that can slow you down is contention between systems. If this contention is reduced or eliminated, the system will show scaleable performance when you add nodes.

You can reduce this contention if you understand how the data is accessed. Only by knowing your application can you most effectively optimize the parallel server system.

If you have a system in which some users access only certain tables and other users primarily access other tables, you can benefit from partitioning those users. If the users are spread out in a random fashion, you see a lot of pinging because multiple nodes want to update data in the same table (see Figure 21.2).


Figure 21.2  PCM lock contention.

By segmenting the users so that the users on each node access data in the same tables, you can greatly reduce PCM lock contention because each instance can hold the locks longer. Although you still have some contention, any reduction can be very useful. This kind of segmentation is necessary to get optimum performance from the Oracle parallel server system. An example of a segmented system is shown in Figure 21.3.


Figure 21.3  Reducing contention by segmenting users.

If all users have to access all the data, you can still segment this activity by using a Transaction Monitor (TM) such as the Tuxedo ETP system. A TM is class of product, known as middleware , used to facilitate the communication between the client and server (see Chapter 36, “Using Middleware Products”).


Previous Table of Contents Next


Products |  Contact Us |  About Us |  Privacy  |  Ad Info  |  Home

Use of this site is subject to certain Terms & Conditions, Copyright © 1996-2000 EarthWeb Inc.
All rights reserved. Reproduction whole or in part in any form or medium without express written permission of EarthWeb is prohibited.